Imports NENAData
Imports NENAData.NENAMember

Partial Class Home
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Try

        'Put user code to initialize the page here
        If Session("Message") <> "" Then
            lblMessage.Text = Session("Message")
            Session("Message") = ""
        End If

        If User.Identity.Name Is Nothing Then
            Session.Abandon()
            Response.Redirect("http://membership.nena.ca/", False)
        End If

        Dim oNenaData As NENAMember = New NENAMember
        Dim oMember = oNenaData.GetMember_byCsUserName(User.Identity.Name)

        Session("Member_ID") = oMember.Member_ID
        Session("FullName") = oMember.FirstName & " " & oMember.LastName
        lblFullName.Text = Session("FullName")
        Response.Write("NENA MemberID :" & Session("Member_ID"))

        'Catch ex As Exception
        '    Response.Write(ex.Message)
        'End Try

    End Sub

End Class
